gint *natural);
static void gtk_table_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
-static void gtk_table_compute_expand (GtkWidget *widget,
- gboolean *hexpand,
- gboolean *vexpand);
static void gtk_table_add (GtkContainer *container,
GtkWidget *widget);
static void gtk_table_remove (GtkContainer *container,
widget_class->get_preferred_width = gtk_table_get_preferred_width;
widget_class->get_preferred_height = gtk_table_get_preferred_height;
widget_class->size_allocate = gtk_table_size_allocate;
- widget_class->compute_expand = gtk_table_compute_expand;
container_class->add = gtk_table_add;
container_class->remove = gtk_table_remove;
GTK_PARAM_READWRITE));
}
-static void
-gtk_table_compute_expand (GtkWidget *widget,
- gboolean *hexpand_p,
- gboolean *vexpand_p)
-{
- GtkTable *table = GTK_TABLE (widget);
- GtkTablePrivate *priv = table->priv;
- GList *list;
- GtkTableChild *child;
- gboolean hexpand;
- gboolean vexpand;
-
- hexpand = FALSE;
- vexpand = FALSE;
-
- for (list = priv->children; list; list = list->next)
- {
- child = list->data;
-
- if (!hexpand)
- hexpand = child->xexpand ||
- gtk_widget_compute_expand (child->widget,
- GTK_ORIENTATION_HORIZONTAL);
-
- if (!vexpand)
- vexpand = child->yexpand ||
- gtk_widget_compute_expand (child->widget,
- GTK_ORIENTATION_VERTICAL);
-
- if (hexpand && vexpand)
- break;
- }
-
- *hexpand_p = hexpand;
- *vexpand_p = vexpand;
-}
-
static GType
gtk_table_child_type (GtkContainer *container)
{
break;
case CHILD_PROP_X_OPTIONS:
{
- gboolean xexpand;
-
- xexpand = (g_value_get_flags (value) & GTK_EXPAND) != 0;
-
- if (table_child->xexpand != xexpand)
- {
- table_child->xexpand = xexpand;
- gtk_widget_queue_compute_expand (GTK_WIDGET (table));
- }
-
+ table_child->xexpand = (g_value_get_flags (value) & GTK_EXPAND) != 0;
table_child->xshrink = (g_value_get_flags (value) & GTK_SHRINK) != 0;
table_child->xfill = (g_value_get_flags (value) & GTK_FILL) != 0;
}
break;
case CHILD_PROP_Y_OPTIONS:
{
- gboolean yexpand;
-
- yexpand = (g_value_get_flags (value) & GTK_EXPAND) != 0;
-
- if (table_child->yexpand != yexpand)
- {
- table_child->yexpand = yexpand;
- gtk_widget_queue_compute_expand (GTK_WIDGET (table));
- }
-
+ table_child->yexpand = (g_value_get_flags (value) & GTK_EXPAND) != 0;
table_child->yshrink = (g_value_get_flags (value) & GTK_SHRINK) != 0;
table_child->yfill = (g_value_get_flags (value) & GTK_FILL) != 0;
}